<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="common/header" />
<body> 

<div class="login">
    <div class="message">激活帐号</div>
    <div id="darkbannerwrap"></div>
	<input name="action" value="login" type="hidden">
	<input id="activateCode" name="activateCode" placeholder="邮箱激活码" required="" type="text">
	<hr class="hr15">
	<input id="register" value="立即激活帐号" style="width:100%;" type="submit">
</div>
</body>
<link th:href="@{/resources/css/login.css}" type="text/css" rel="stylesheet">
<script>
    $(function () {
        $('#register').click(function () {
            var data = {
                "activateCode": $('#activateCode').val()
            };
            loading("请稍等，正在验证激活!");
            $.getJSON('/registerAction', data, function (data) {
                closeLoading();
                if(data.code == 1) {
                    winTip('注册成功！请前往登录！', true);
					$('#winBtn').click(function () {
						window.location = "/login";
                    });
                } else {
                    winTip('激活码验证失败！请重试！', false);
                }
            });
        });
    });
</script>
</html>